package com.ly.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.system.common.mapper.BisShopMapper;
import com.system.common.mapper.BisShopUserMapper;
import com.system.common.mapper.SysMenuMapper;
import com.system.common.pojo.BisShopUser;
import com.system.common.pojo.SysMenu;

@Service
public class ShopUserServiceImpl implements ShopUserService{
	
	@Autowired
	private BisShopUserMapper shopMapper;
	
	@Autowired
	private SysMenuMapper menuMapper;
	
	@Autowired
	private BisShopMapper sMapper;

	@Override
	public BisShopUser select(Map<?, ?> map) {
		BisShopUser user=shopMapper.selectAP(map);		
		if (user!=null) {
			return user;
		}
		return null;
	}

	@Override
	public List<SysMenu> selectByAccount(String account) {
		return menuMapper.selectByAccount(account);
	}

	@Override
	public List<Map<String, Object>> selectHome(String shopId) {
		return sMapper.selectHome(shopId);
	}

	@Override
	public List<Map<String, Object>> getShop(String shopUserId) {
		if (shopUserId!=null) {
			return sMapper.getShop(shopUserId);
		}
		return null;
	}
	
}
